package com.lepu.app.fun.tool.ymsjb;

import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebSettings;
import com.core.lib.application.BaseFragmentActivity;
import com.core.lib.utils.main.UtilityBase;
import com.eyzhs.app.R;
import com.lepu.app.widget.CustomTopBarNew;
import com.lepu.app.widget.CustomTopBarNew.OnTopbarNewLeftLayoutListener;
import com.lepu.app.widget.CustomTopBarNew.OnTopbarNewRightButtonListener;

public class YiMiaoShowActivity extends BaseFragmentActivity implements
		OnTopbarNewLeftLayoutListener,OnTopbarNewRightButtonListener {
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		mNeedStatusBar = false;
		mNeedSwipeBack = false;
		super.onCreate(savedInstanceState);
		setContentView(R.layout.tool_yimiao_show_activity);

		UtilityBase.setStatusBarRes(this, R.color.color_daichan, true);
		init();
	}

	@Override
	public void onDestroy() {
		super.onDestroy();
	}

	/**
	 * 添加页面动画，需要重写这个方法，
	 */
	@Override
	public void onBackPressed() {
		finish(true);
	}

	@Override
	public void onTopbarLeftLayoutSelected() {
		finish(true);
	}

	@Override
	public void onTopbarRightButtonSelected() {
		
	}
	
	/**
	 * 初始化方法
	 */
	private void init() {
		// topbar
		CustomTopBarNew topbar = (CustomTopBarNew) findViewById(R.id.topbar);
		topbar.setTopbarTitle("疫苗时间表");
		topbar.setRightText("");
		topbar.setTopbarBackground(R.color.color_daichan);
		topbar.setonTopbarNewLeftLayoutListener(this);
		topbar.setOnTopbarNewRightButtonListener(this);

		WebView webView = (WebView) findViewById(R.id.webView);
        webView.getSettings().setLayoutAlgorithm(WebSettings.LayoutAlgorithm.SINGLE_COLUMN);
        
        webView.getSettings().setUseWideViewPort(true);//设定支持 viewport
        webView.getSettings().setLoadWithOverviewMode(true);

        webView.getSettings().setBuiltInZoomControls(true);

        webView.getSettings().setSupportZoom(true);//设定支持缩放   
        
        
        webView.loadUrl("file:///android_asset/tool_yimiao_show_img.jpg");
        
	}

}
